#!/usr/bin/python3.5
# -*- coding utf-8

import time
from threading import Thread


def my_count():
    i = 0
    for _ in range(100000000):
        i += 1


def main():
    thread_array = {}
    start_time = time.time()
    for tid in range(2):
        t = Thread(target=my_count)
        t.start()
        thread_array[tid] = t

    for i in range(2):
        thread_array[i].join()

    end_start = time.time()

    print("total time is: {}".format(end_start - start_time))


if __name__ == '__main__':
    main()